var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate'); 

var schema = new mongoose.Schema({
    cateId:mongoose.Schema.ObjectId,
    fieldname:String,
    originalname:String,
    encoding:String,
    date: { type: Date, default: Date.now },
    mimetype:String,  
    desination:String,
    filename:String,
    path:String,
    size:Number,
  
});
schema.plugin(mongoosePaginate);

module.exports =  mongoose.model('upload',  schema); // Model.paginate()